package nl.sportan.samenloop.adapter;

import nl.sportan.samenloop.R;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;

public class ImageReelAdapter extends BaseAdapter {

	private Context mContext;
	
	
	public ImageReelAdapter (Context context) {
		mContext = context;
	}
	
	  private Integer[] mImageIds = {
	            R.drawable.logo,
	            R.drawable.logo,
	            R.drawable.logo,
	            R.drawable.logo
	  };
	
	
	public int getCount() {
		  return mImageIds.length;
	}

	public Object getItem(int position) {
		return position;
	}

	public long getItemId(int position) {
		return position;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		 ImageView i = new ImageView(mContext);

	        i.setImageResource(mImageIds[position]);
	        i.setLayoutParams(new Gallery.LayoutParams(150, 100));
	        i.setScaleType(ImageView.ScaleType.FIT_XY);
	       
	        return i;
	}

	

}
